<?php
namespace Addons\Feedback\Controller;
class IndexController extends \Addon {

	public function __construct() {
		parent::__construct();
	}

	public function index() {
		//$sql = "store_id='$this->admin_store_id'";
		/*******回复期数*****/
		// if ($this->k = I("k", "", "urldecode")) {
		// 	$sql .= "  and (msg like '%$k%')";
		// }
		$order = "id desc";
		$model = BoxModel("addon_feedback");
		$data = $model->get(1, 10, $order);
		$this->data = $data['list'];
		$this->show_page($data['pager']);
		$this->admin_display();
	}

	public function del() {
		$id = I('id');
		if ($id) {
			BoxModel("addon_feedback")->where(array('id' => $id))->delete();
		}
		$this->jump("操作成功");
	}

}